<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>SLSystem</title>
    <meta name="keywords" content="面向学习型的开源框架，简洁高效，杜绝过渡封装，展现技术本质本质">
    <meta name="description" content="面向学习型的开源框架，简洁高效，杜绝过渡封装，展现技术本质本质">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <!--<link href="/css/style.css?v=4.1.0" rel="stylesheet">-->
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
	<div class="col-sm-12">
		<div class="ibox">
			<div class="ibox-body">

				<!--搜索区域-->
				<div class="fixed-table-toolbar" style="padding: 10px;">
					<form class="form-inline" id="signupForm" th:action="@{/toLeaveInstructor}" th:object="${pageUtil}" method="post">
						<div class="form-group">
							<input type="text" class="form-control" name="para01" id="para01" th:value="${pageUtil.para01}" placeholder="请输入学号">
						</div>
						<div class="form-group">
							<select data-placeholder="选择班级" name="para02" id="para02" class="form-control chosen-select" style="width: 100%">
								<option value="">选择班级</option>
								<option th:each="grade:${grades}"
										th:value="${grade.gradeId}"
										th:text="${grade.gradeName}"
										th:selected="${grade.gradeId==pageUtil.para02}"></option>
							</select>
						</div>
						<button class="btn btn-primary" type="submit">查询</button>
						<a class="btn btn-success" onclick="reset()" id="reset">重置</a>
					</form>
				</div>

				<!--表格数据区域-->
				<table id="exampleTable" data-mobile-responsive="true" class="table table-hover table-bordered table-striped">
					<thead>
						<tr>
							<th>请假编号</th>
							<th width="25%">申请学生</th>
							<th>请假开始</th>
							<th>请假结束</th>
							<th>请假原因</th>
							<th>申请时间</th>
							<th>操作</th>
						</tr>
						</thead>
						<tbody>
						<tr  th:each="leave : ${leaves}">
							<th scope="row" th:text="${leave.id}">1</th>
							<td th:text="${leave.studentId}"></td>
							<td th:text="${leave.startDate}"></td>
							<td th:text="${leave.endDate}"></td>
							<td th:text="${leave.reason}"></td>
							<td th:text="${leave.applyDate}"></td>
							<td>
								<a class="btn btn-primary btn-sm" title="详情" th:href="@{/leaveTeacher/toLeaveInstructorInfo(id=${leave.id},type='apply')}">详情</a>
								<a class="btn btn-success btn-sm" title="同意" th:href="@{/leaveTeacher/audit(id=${leave.id},state=1)}" onclick="prompt();">同意</a>
								<a class="btn btn-warning btn-sm" title="拒绝" th:href="@{/leaveTeacher/audit(id=${leave.id},state=2)}" onclick="prompt();">拒绝</a>
							</td>
						</tr>
					</tbody>
				</table>

				<!-- 分页页面,设置页面跳转路径 -->
				<script th:inline="javascript"> var type = "toLeaveInstructor";  </script>
				<div th:replace="public/page::html" ></div>

			</div>
		</div>
	</div>
</div>

<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4" th:src="@{/js/jquery.min.js?v=2.1.4}"></script>
<script src="/js/bootstrap.min.js?v=3.3.6" th:src="@{/js/bootstrap.min.js?v=3.3.6}"></script>
<script src="/js/bootstrap-select.js?v=3.3.6" th:src="@{/js/bootstrap-select.js?v1.6.3}"></script>
<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js"></script>

<!-- 自定义js -->
<script src="/js/content.js?v=1.0.0" th:src="@{/js/content.js?v=1.0.0}"></script>

<!-- jQuery Validation plugin javascript-->
<script src="/js/ajax-util.js"></script>
<script src="/js/plugins/validate/jquery.validate.min.js" th:src="@{/js/plugins/validate/jquery.validate.min.js}"></script>
<script src="/js/plugins/validate/messages_zh.min.js" th:src="@{/js/plugins/validate/messages_zh.min.js}"></script>
<script src="/js/plugins/layer/layer.min.js" th:src="@{/js/plugins/layer/layer.min.js}"></script>

<!-- 自定义js方法 -->
<script type="text/javascript">

	//检查输入框值填写
	function prompt() {
        layer.msg("审核成功");
	}
	
	function reset() {
        $('#para01').val("");
        $('#para02').val("")
    }


</script>

</body>
</html>